/**
 * 
 */
package stc.skymobi.fsm.transformer;

import org.apache.commons.beanutils.LazyDynaBean;
import org.apache.commons.collections.Transformer;

import stc.skymobi.fsm.FSMContext;


/**
 * @author hp
 *
 */
public class DefaultSnapshotFactory implements Transformer {

	/* (non-Javadoc)
	 * @see org.apache.commons.collections.Transformer#transform(java.lang.Object)
	 */
	public Object transform(Object input) {
		LazyDynaBean bean = new LazyDynaBean();
		bean.set("key", ((FSMContext)input).getKey().toString());
		return	bean;
	}

}
